package com.qf.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.entity.TlUser;
import com.qf.mapper.AdminUserMapper;
import com.qf.service.AdminUserService;
import com.qf.utils.Mycode;
import com.qf.utils.ResultMsg;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, TlUser> implements AdminUserService {
    @Override
    public ResultMsg findAll() {
        List<TlUser> list = super.list();
        return ResultMsg.SUCCESS(list);

    }

    @Override
    public ResultMsg del(Integer uid) {
        boolean b = super.removeById(uid);
        if (b)
            return ResultMsg.SUCCESS();
        return ResultMsg.ERROR(Mycode.DELETEALL_ERRO);
    }
}
